package org.tity.server.boot;

import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.boot.autoconfigure.mongo.MongoAutoConfiguration;
import org.springframework.context.annotation.ComponentScan;
import org.springframework.scheduling.annotation.EnableScheduling;
import org.tity.backends.boot.BackendsApplication;
import org.tity.frontends.boot.FrontendsApplication;

import com.alicp.jetcache.anno.config.EnableCreateCacheAnnotation;
import com.alicp.jetcache.anno.config.EnableMethodCache;
 
@SpringBootApplication(exclude = MongoAutoConfiguration.class)
@ComponentScan(basePackages = { TestBooter.PKG_NAME , FrontendsApplication.FRONT_ENDS_PACKAGE  })
@EnableMethodCache(basePackages =  { TestBooter.PKG_NAME })
@EnableCreateCacheAnnotation()
@EnableScheduling
public class TestBooter {

	public static final String PKG_NAME= "org.tity.server";
	
public static void main(String[] args) {
		
		Runnable before = new Runnable() {
            @Override
            public void run() {
                BootUtil.setSystemProperties();
            }
        };
		BackendsApplication.run(TestBooter.class, before, null, args);
		
	}
	
}
